﻿using BLL.Origins;
using Common;
using Model.Origins;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace DAGApp
{
    public partial class Origins : System.Web.UI.Page
    {
        OriginsTempletBLL bll = new OriginsTempletBLL();
        protected void Page_Load(object sender, EventArgs e)
        {
        
            if (!IsPostBack)
            {
                int tempId = string.IsNullOrEmpty(Request.QueryString["tempid"]) ? 0 : PageValidate.ConvertToTrimInt(Request.QueryString["tempid"]);
                //显示对应的模板信息
                OriginsTempletModel tempModel = bll.GetModelById(tempId);
                if (tempModel.ImgUrl=="" )
                    this.ResultContents.InnerHtml =tempModel.Content;
                else
                this.ResultContents.InnerHtml = @"<img src='"+tempModel.ImgUrl+"' style='max-width:100%'/>" + tempModel.Content;
            }
        }


    }

}
 